package testcontainer;

import org.junit.Test;
import org.testcontainers.containers.MySQLContainer;
import org.testcontainers.junit.jupiter.Container;

import static org.junit.Assert.assertTrue;

/**
 * @author pizhihui
 * @date 2024-07-05 22:28
 */
public class JdbcContainers {


    static MySQLContainer mySQLContainer = new MySQLContainer()
            .withUsername("root")
            .withPassword("123456")
            .withDatabaseName("test");


    public static void main(String[] args) {

        mySQLContainer.start();

        String jdbcUrl = mySQLContainer.getJdbcUrl();

        System.out.println("jdbc: " + jdbcUrl);

    }

//    @Test
//    public void test1() {
//
//        System.out.println("hell world");
//
//        assertTrue(true);
//
//
//
//    }

}
